async function async1() {
  console.log('AAAA'); // 2
  async2();
  console.log('BBBB'); // 4
}

async function async2() {
  console.log('CCCC'); // 3
}

console.log('DDDD'); // 1

setTimeout(function () {
  console.log('DDDD'); // 8
}, 0);

async1();

new Promise(function (resolve) {
  console.log('GGGG'); // 6
  resolve();
}).then(function () {
  console.log('HHHH'); // 7
});

console.log('IIII'); // 6
